package com.keyingbo.leran.pattern.singletonpattern.lazy;

import com.keyingbo.leran.pattern.singletonpattern.hungry.HungrySingleton;

/**
 * @Auther: KEYB
 * @Date: 2019-3-11 23:22
 * @Description:
 */
public class LazySimpleSingleton {
    private static LazySimpleSingleton lazySimpleSingleton = null;
    private LazySimpleSingleton(){}
    public static LazySimpleSingleton getInstance(){
        if (lazySimpleSingleton == null){
            lazySimpleSingleton = new LazySimpleSingleton();
        }
        return lazySimpleSingleton;
    }
}
